package com.seagox.chat.template;

import cn.afterturn.easypoi.excel.annotation.Excel;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;

public class UserModel extends ImportModel {

	/**
	 * 部门编码
	 */
	@Excel(name = "部门编码")
	@NotNull(message = "不能为空或有误")
	private String code;

	/**
	 * 部门名称
	 */
	@Excel(name = "部门名称")
	@NotNull(message = "不能为空或有误")
	private String deptName;
	
	/**
	 * 姓名
	 */
	@Excel(name = "姓名")
	@NotNull(message = "不能为空或有误")
	private String name;
	
	/**
	 * 性别(1:男;2:女;)
	 */
	@Excel(name = "性别", replace = { "男_1", "女_2" })
	@NotNull(message = "不能为空或有误")
	private Integer sex;
	
	/**
	 * 岗位
	 */
	@Excel(name = "岗位")
	@NotNull(message = "不能为空或有误")
	private String position;

	/**
	 * 手机号
	 */
	@Excel(name = "手机号")
	@NotNull(message = "不能为空或有误")
	@Length(min = 11, max=11, message="位数不对")
	private String phone;

	/**
	 * 邮箱
	 */
	@Excel(name = "邮箱")
	@Pattern(regexp = "^([a-z0-9A-Z]+[-|\\\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\\\.)+[a-zA-Z]{2,}$", message = "有误")
	private String email;
	
	/**
     * 排序
     */
	@Excel(name = "排序")
	@NotNull(message = "不能为空或有误")
    private Integer sort;

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

}
